<main>
	<header>
		<div class="toolbar">
			<a class="bar-button back-button"><i class="dwz-icon-arrow-left"></i></a>
			<div class="header-title">录入卸货过磅信息</div>
		</div>
	</header>

	<div class="content">

		<form method="post" action="{{form_url}}" onsubmit="return biz.transport.formSubmitWeigh(this)">
			<input type="hidden" name="transport_id" value="{{vo.id}}">
			<input type="hidden" name="__sign_url" value="" class="required dwz-sign-input" data-error="您还没有完成签字！">

			<div class="scroll-content dwz-scroll">
				<div class="scroll">

					{{if vo.status == 0 || vo.status == 1}}
					<div class="pageFormContent unitBox">
						<div class="form-item">
							<div class="item-content">
								<label>净重(kg)</label>
								<input type="number" name="weigh_last_commit" value="{{vo.weigh_last_commit|filterInputNum}}" class="required" placeholder="请输入净重" min="0.00" max="100000.00" step="0.01" data-error="请输入净重">
							</div>
						</div>
						<div class="form-item">
							<label>磅单照片</label>
							<div class="item-content">

								<ul id="upload-preview-weight-last" class="upload-preview dwz-ctl-del">
									{{each vo.weigh_last_pic as item}}
									<li class="thumbnail">
										<a class="img-del old-img-del" href="javascript:"></a><img class="pic" src="{{item}}" data-src="{{item}}"></li>{{/each}}
								</ul>
								<div class="upload-wrap" rel="#upload-preview-weight-last" data-name="__imgUrl[]">
									<button type="button">Upload</button>
								</div>
							</div>
						</div>
						<div class="form-item">
							<label>收货人电子签名</label>
							<div class="item-content">
								{{each vo.receive_signature as item}}
								<div class="sign-box pic">
									<img src="{{item}}">
								</div>
								{{/each}} {{if !vo.receive_signature.length}}
								<div class="dwz-sign-box sign-box pic">
									<a class="button sign" type="button" href="javascript:$.dialog.open({url:'tpl/helper/sign.html?dwz_callback=$.drawingBoardRender'})">点击完成签字</a>
								</div>
								{{/if}}
							</div>
						</div>

						<div class="divider"></div>
					</div>

					<div class="form-bar">
						<button class="button" type="submit">提交</button>
					</div>

					{{else}}

					<div class="pageFormContent unitBox">
						<div class="form-item">
							<div class="item-content">
								<label>净重(kg)</label>
								<input type="number" name="weigh_last_commit" value="{{vo.weigh_last_commit}}" class="required" placeholder="请输入净重" min="1" maxlength="20" data-error="请输入净重">
							</div>
						</div>
						<div class="form-item">
							<label>磅单照片</label>
							<div class="item-content">
								<ul class="upload-preview">
									{{each vo.weigh_last_pic as item}}
									<li class="thumbnail"><img class="pic" src="{{item}}" data-src="{{item}}"></li>{{/each}}
								</ul>
							</div>
						</div>
						<div class="form-item">
							<label>收货人电子签名</label>
							<div class="item-content">
								<div class="sign-box pic">
									<img src="{{vo.weigh_last_sign_url}}">
								</div>
							</div>
						</div>

					</div>
					{{/if}}

				</div>
			</div>
		</form>

	</div>
</main>
